package com.raycloud.robot.custom.zdfUtils.dto.req;

import java.util.UUID;
import java.util.Objects;
import com.google.common.collect.Maps;
import java.util.Map;
import com.raycloud.robot.custom.zdfUtils.dto.resp.GetPictureUrlZdfResponse;
import com.raycloud.robot.custom.zdfUtils.dto.basic.BaseZdfRequest;

public class GetPictureUrlZdfRequest implements BaseZdfRequest<GetPictureUrlZdfResponse>{
    private String imageUrl;
    private Integer topN;
    private String groupId;
    public String getImageUrl(){
        return this.imageUrl;
    }
    public void setImageUrl(final String imageUrl){
        this.imageUrl=imageUrl;
    }
    public Integer getTopN(){
        return this.topN;
    }
    public void setTopN(final Integer topN){
        this.topN=topN;
    }
    public String getGroupId(){
        return this.groupId;
    }
    public void setGroupId(final String groupId){
        this.groupId=groupId;
    }
    @Override
    public String getHttpPath(){
        return "/groups/v2/compare-1vn";
    }
    @Override
    public Map<String,Object> getParams(){
        final Map<String,Object> conditon=(Map<String,Object>)Maps.newHashMap();
        conditon.put("image_url",this.imageUrl);
        if(Objects.isNull(this.topN)){
            conditon.put("top_n","10");
        }
        else{
            conditon.put("top_n",this.topN);
        }
        conditon.put("source","1");
        conditon.put("search_time","2019-12-22 01:02:03");
        conditon.put("union_id",UUID.randomUUID().toString());
        conditon.put("group_id",this.groupId);
        conditon.put("phone_num","11111111111111111111");
        return conditon;
    }
    @Override
    public Class<GetPictureUrlZdfResponse> getResponseClass(){
        return GetPictureUrlZdfResponse.class;
    }
}
